function getStyle(domobj, attr) {
	if(window.getComputedStyle) {
		return getComputedStyle(domobj, null)[attr];
	}
	return domobj.currentStyle[attr];
}
//{width:500,height:500,opacity:100}
function startMove(domobj,json,fn){
	clearInterval(domobj.timer);
	domobj.timer = setInterval(function(){
		//假设所有的属性都达到了目标值
		var flag = true;
		//遍历
		for(var attr in json){
			
			var iTarget = json[attr];
			
			if(attr=="opacity"){
				//取出来的当前值还是0-1之间的小数
				var iCur = parseInt(getStyle(domobj,"opacity")*100);
			}else{
				var iCur = parseInt(getStyle(domobj,attr));
			}
			
			
			var iSpeed = (iTarget-iCur)/8;
			
			iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
			
			if(attr == "opacity"){
				domobj.style.opacity = (iCur+iSpeed)/100;
				domobj.style.filter = "alpha(opacity="+(iCur+iSpeed)+")";
			}else{
				domobj.style[attr] = iCur + iSpeed + "px";
			}
			
			
			
			if(iCur!=iTarget){//只要有一个没有达到目标值
				flag = false;
			}

		}
		
		if(flag){//都达到了目标值
			
			clearInterval(domobj.timer);
			
			if(fn){
				fn();
			}
		}
		
		
	},20);
}
